package fox.framework.rpc.context.definition;

/**
 * @author cuichao
 * @Description: RpcDefinitionBuilder
 * @Date: create in 2021/3/5 16:41
 */
public final class RpcDefinitionBuilder {

    public static RpcDefinitionBuilder genericRpcDefinition() {
        return new RpcDefinitionBuilder(new GenericRpcDefinition());
    }

    private AbstractRpcDefinition definition;


    public RpcDefinitionBuilder(AbstractRpcDefinition definition) {
        this.definition = definition;
    }

    public AbstractRpcDefinition getDefinition(){
        return this.definition;
    }


    public void setApplicationName(String applicationName) {
        this.definition.setApplicationName(applicationName);
    }


    public void setMetaspace(String metaspace) {
        this.definition.setMetaspace(metaspace);
    }


    public void setGroup(String group) {
        this.definition.setGroup(group);
    }


    public void setServiceInterface(Class<?> serviceInterface) {
        this.definition.setServiceInterface(serviceInterface);
    }

    public void setLazy(boolean lazy) {
        this.definition.setLazy(lazy);
    }

    public void setProvider(boolean provider) {
        this.definition.setProvider(provider);
    }

    public void setMessageConverterName(String messageConverterName) {
        this.definition.setMessageConverterName(messageConverterName);
    }


}
